<div style="padding-left: 130px;">
    <div style="float: left;text-align: center;width: 75px;">
        <a id="colorbox-{$name}" class="button" onclick="$(this).colorbox({height: 600});return false;" href="{empty name='value'}{$Think.config.static_url}/admin/images/no_photo.png{else/}{$Think.config.mp_image_url}/{$value}{/empty}"><span>查看图片</span></a>
    </div>
    <div style="float: left;">
        <div id="uploadify-{$name}"></div>
    </div>
</div>
<input type="hidden" id="{$name}" name="{$name}" value="{$value}" />
<script type="text/javascript">
    $('#uploadify-{$name}').Huploadify({
        uploader: '{:config("mp_upload_url")}',
        buttonText: '上传图片',
        fileTypeDesc: '*.jpg;*.jpeg;*.gif;*.png;',
        fileTypeExts: '*.jpg;*.jpeg;*.gif;*.png;',
        auto: true,
        multi: false,
        height: 21,
        width: 100,
        fileObjName: 'image',
        onUploadSuccess: function uploadifySuccess(file, data, response) {
            data = JSON.parse(data);
            if (data.result == '0') {
                $('#colorbox-{$name}').attr('href', "{:config('mp_image_url')}" + data.data);
                $('#{$name}').val(data.data);
            } else {
                alertMsg.error(data.message);
            }
        }
    });

</script>